<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.model.ClienteModel"%>
<%@page import="com.dao.ClienteDao"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
%>
<html>
	<head>
		<title>Tec Games - Pagina Teste</title>
		<link rel="stylesheet" type="text/css" href="../resources/css/default.css" />
		<link rel="shortcut icon" href="<%=request.getContextPath()%>/favicon.ico" type="image/x-icon" />
	</head>
	<body>
		<div id="container">
			<jsp:include page="../resources/header.jsp"/>
			<div id="content">
				<%
					ClienteModel ClienteModel;
					ClienteDao clienteDao = new ClienteDao();
					List<ClienteModel> clienteModels = new ArrayList<ClienteModel>();
				%>
				<table width="100%" cellspacing="10">
					<tr id="tableHeader">
						<td>Id</td>
						<td>Nome</td>
						<td>Email</td>
						<td>Telefone</td>
						<td>Celular</td>
						<td>Sexo</td>
					</tr>
					<%
						clienteModels = clienteDao.getClientes();
						for(ClienteModel cliente:clienteModels){
							out.print("\n<tr>");
							out.print("\n<td>"+cliente.getId()+"</td>");
							out.print("\n<td>"+cliente.getNome()+"</td>");
							out.print("\n<td>"+cliente.getEmail()+"</td>");
							out.print("\n<td>"+cliente.getTelefone()+"</td>");
							out.print("\n<td>"+cliente.getCelular()+"</td>");
							out.print("\n<td>"+cliente.getSexo()+"</td>");
							out.print("\n</tr>");
						}
					%>
				</table> 
				<a href="adminMenu.jsp">Voltar</a>
			</div>
		</div>
	</body>
</html>